.class public Lcom/glympse/platform/common/SentTicketList;
.super Ljava/lang/Object;
.source "SentTicketList.java"


# instance fields
.field protected m_fNeedsSorting:Z

.field public m_listTickets:Lcom/glympse/platform/GVector$Tickets;

.field protected m_nNextSequence:I

.field protected m_oTicketComparator:Lcom/glympse/platform/common/Ticket$CompareByExpireTime;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 21
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 23
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 24
    const/4 v0, 0x1

    iput v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_nNextSequence:I

    .line 26
    new-instance v0, Lcom/glympse/platform/common/Ticket$CompareByExpireTime;

    invoke-direct {v0}, Lcom/glympse/platform/common/Ticket$CompareByExpireTime;-><init>()V

    iput-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_oTicketComparator:Lcom/glympse/platform/common/Ticket$CompareByExpireTime;

    .line 28
    new-instance v0, Lcom/glympse/platform/GVector$Tickets;

    invoke-direct {v0}, Lcom/glympse/platform/GVector$Tickets;-><init>()V

    iput-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    .line 21
    return-void
.end method


# virtual methods
.method public AddTimeToTicket(Lcom/glympse/platform/common/Ticket;J)Z
    .locals 11
    .parameter "oTicket"
    .parameter "lTimeMs"

    .prologue
    const-wide/32 v9, 0xdbba00

    const/4 v8, 0x1

    const/4 v7, 0x0

    .line 411
    if-eqz p1, :cond_1

    .line 414
    new-instance v4, Lcom/glympse/platform/common/Ticket;

    invoke-direct {v4, p1}, Lcom/glympse/platform/common/Ticket;-><init>(Lcom/glympse/platform/common/Ticket;)V

    .line 417
    .local v4, oTicketNew:Lcom/glympse/platform/common/Ticket;
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v0

    .line 418
    .local v0, lCurrent:J
    iget-wide v5, p1, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    invoke-static {v0, v1, v5, v6}, Ljava/lang/Math;->max(JJ)J

    move-result-wide v2

    .line 421
    .local v2, lExpireTime:J
    add-long/2addr v2, p2

    .line 422
    add-long v5, v0, v9

    cmp-long v5, v2, v5

    if-lez v5, :cond_0

    .line 424
    add-long v2, v0, v9

    .line 428
    :cond_0
    sub-long v5, v2, v0

    long-to-int v5, v5

    iput v5, v4, Lcom/glympse/platform/common/Ticket;->m_nDurationMs:I

    .line 434
    iput-wide v2, p1, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    .line 435
    iput-boolean v7, p1, Lcom/glympse/platform/common/Ticket;->m_fExpiring:Z

    .line 438
    iput-boolean v8, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 439
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->Sort()V

    .line 442
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget-object v5, v5, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v5, p1, v4}, Lcom/glympse/platform/common/ServerPost;->AddModifyTicket(Lcom/glympse/platform/common/Ticket;Lcom/glympse/platform/common/Ticket;)Z

    move-result v5

    if-eqz v5, :cond_1

    move v5, v8

    .line 447
    .end local v0           #lCurrent:J
    .end local v2           #lExpireTime:J
    .end local v4           #oTicketNew:Lcom/glympse/platform/common/Ticket;
    :goto_0
    return v5

    :cond_1
    move v5, v7

    goto :goto_0
.end method

.method public AnyActive()Z
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 494
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->Sort()V

    .line 499
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0}, Lcom/glympse/platform/GVector$Tickets;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_1

    .line 502
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0, v4}, Lcom/glympse/platform/GVector$Tickets;->elementAt(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/glympse/platform/common/Ticket;

    iget-wide v0, p0, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v2

    cmp-long v0, v0, v2

    if-lez v0, :cond_0

    const/4 v0, 0x1

    .line 505
    :goto_0
    return v0

    :cond_0
    move v0, v4

    .line 502
    goto :goto_0

    .restart local p0
    :cond_1
    move v0, v4

    .line 505
    goto :goto_0
.end method

.method public CheckForArrival(J)Z
    .locals 13
    .parameter "lCurrent"

    .prologue
    .line 609
    const/4 v0, 0x0

    .line 610
    .local v0, fArrived:Z
    const/4 v1, 0x0

    .line 613
    .local v1, fPostNow:Z
    iget-object v8, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v8}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v4

    .local v4, iter:Ljava/util/Enumeration;
    :cond_0
    :goto_0
    invoke-interface {v4}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v8

    if-nez v8, :cond_3

    .line 708
    :cond_1
    if-eqz v1, :cond_2

    .line 711
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v8}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    .line 714
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    invoke-virtual {v8}, Lcom/glympse/platform/Platform;->ShowArrivalNotification()V

    .line 717
    :cond_2
    return v0

    .line 615
    :cond_3
    invoke-interface {v4}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lcom/glympse/platform/common/Ticket;

    .line 618
    .local v7, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v8, v7, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v8, v8, p1

    if-lez v8, :cond_1

    .line 624
    iget-boolean v8, v7, Lcom/glympse/platform/common/Ticket;->m_fArrived:Z

    if-nez v8, :cond_0

    .line 637
    iget-boolean v8, v7, Lcom/glympse/platform/common/Ticket;->m_fProximitySatisfied:Z

    if-nez v8, :cond_4

    .line 640
    const/4 v3, 0x0

    .local v3, i:I
    :goto_1
    iget-object v8, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    array-length v8, v8

    if-lt v3, v8, :cond_6

    .line 682
    .end local v3           #i:I
    :cond_4
    :goto_2
    iget-boolean v8, v7, Lcom/glympse/platform/common/Ticket;->m_fProximitySatisfied:Z

    if-eqz v8, :cond_0

    .line 688
    iget-wide v8, v7, Lcom/glympse/platform/common/Ticket;->m_lAutoExpireTime:J

    cmp-long v8, v8, p1

    if-lez v8, :cond_5

    iget v8, v7, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    iget v9, v7, Lcom/glympse/platform/common/Ticket;->m_fltMinDistMeters:F

    const/high16 v10, 0x43fa

    add-float/2addr v9, v10

    cmpl-float v8, v8, v9

    if-ltz v8, :cond_0

    .line 691
    :cond_5
    const/4 v8, 0x1

    iput-boolean v8, v7, Lcom/glympse/platform/common/Ticket;->m_fArrived:Z

    .line 694
    const/4 v0, 0x1

    .line 697
    const/4 v8, 0x2

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v9

    iget-object v9, v9, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget v9, v9, Lcom/glympse/platform/Config;->m_eExpireOnArrival:I

    if-ne v8, v9, :cond_0

    .line 699
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v8

    iget-object v8, v8, Lcom/glympse/platform/Platform;->m_oSentTickets:Lcom/glympse/platform/common/SentTicketList;

    invoke-virtual {v8, v7}, Lcom/glympse/platform/common/SentTicketList;->ExpireTicket(Lcom/glympse/platform/common/Ticket;)Z

    move-result v8

    if-eqz v8, :cond_0

    .line 701
    const/4 v1, 0x1

    goto :goto_0

    .line 645
    .restart local v3       #i:I
    :cond_6
    const v8, 0x48927c00

    int-to-float v9, v3

    const v10, 0x48927c00

    iget-object v11, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    array-length v11, v11

    const/4 v12, 0x1

    sub-int/2addr v11, v12

    int-to-float v11, v11

    div-float/2addr v10, v11

    mul-float/2addr v9, v10

    sub-float/2addr v8, v9

    float-to-long v5, v8

    .line 650
    .local v5, lTimeRequirement:J
    const/high16 v8, 0x447a

    int-to-float v9, v3

    const v10, 0x446d8000

    iget-object v11, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    array-length v11, v11

    const/4 v12, 0x1

    sub-int/2addr v11, v12

    int-to-float v11, v11

    div-float/2addr v10, v11

    mul-float/2addr v9, v10

    sub-float v2, v8, v9

    .line 653
    .local v2, fltDistRequirement:F
    iget v8, v7, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    cmpg-float v8, v8, v2

    if-gtz v8, :cond_8

    .line 656
    const-wide/16 v8, 0x0

    iget-object v10, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    aget-wide v10, v10, v3

    cmp-long v8, v8, v10

    if-nez v8, :cond_7

    .line 658
    iget-object v8, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    aput-wide p1, v8, v3

    .line 663
    :cond_7
    iget-object v8, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    aget-wide v8, v8, v3

    sub-long v8, p1, v8

    cmp-long v8, v8, v5

    if-ltz v8, :cond_9

    .line 665
    const/4 v8, 0x1

    iput-boolean v8, v7, Lcom/glympse/platform/common/Ticket;->m_fProximitySatisfied:Z

    goto :goto_2

    .line 675
    :cond_8
    iget-object v8, v7, Lcom/glympse/platform/common/Ticket;->m_alProximityStartTimes:[J

    const-wide/16 v9, 0x0

    aput-wide v9, v8, v3

    .line 640
    :cond_9
    add-int/lit8 v3, v3, 0x1

    goto/16 :goto_1
.end method

.method public DeleteTicket(Lcom/glympse/platform/common/Ticket;)Z
    .locals 4
    .parameter "oTicket"

    .prologue
    .line 455
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0, p1}, Lcom/glympse/platform/GVector$Tickets;->removeElement(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 458
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    const/16 v1, 0x1000

    invoke-virtual {v0, v1}, Lcom/glympse/platform/Platform;->DoUpdate(I)V

    .line 460
    const-wide/16 v0, 0x0

    iget-wide v2, p1, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    cmp-long v0, v0, v2

    if-eqz v0, :cond_0

    .line 463
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    iget-wide v1, p1, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    invoke-virtual {v0, v1, v2}, Lcom/glympse/platform/common/ServerPost;->AddDeleteTicket(J)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 465
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v0}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    .line 466
    const/4 v0, 0x1

    .line 471
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public ExpireTicket(Lcom/glympse/platform/common/Ticket;)Z
    .locals 4
    .parameter "oTicket"

    .prologue
    const/4 v3, 0x1

    const/4 v1, 0x0

    .line 390
    if-eqz p1, :cond_0

    .line 392
    new-instance v0, Lcom/glympse/platform/common/Ticket;

    invoke-direct {v0, p1}, Lcom/glympse/platform/common/Ticket;-><init>(Lcom/glympse/platform/common/Ticket;)V

    .line 393
    .local v0, oTicketNew:Lcom/glympse/platform/common/Ticket;
    iput v1, v0, Lcom/glympse/platform/common/Ticket;->m_nDurationMs:I

    .line 396
    iput-boolean v3, p1, Lcom/glympse/platform/common/Ticket;->m_fExpiring:Z

    .line 397
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v1

    iput-wide v1, p1, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    .line 400
    iput-boolean v3, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 401
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->Sort()V

    .line 403
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v1

    iget-object v1, v1, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v1, p1, v0}, Lcom/glympse/platform/common/ServerPost;->AddModifyTicket(Lcom/glympse/platform/common/Ticket;Lcom/glympse/platform/common/Ticket;)Z

    move-result v1

    .line 405
    .end local v0           #oTicketNew:Lcom/glympse/platform/common/Ticket;
    :cond_0
    return v1
.end method

.method public FindTicket(J)Lcom/glympse/platform/common/Ticket;
    .locals 4
    .parameter "lTicketId"

    .prologue
    .line 478
    iget-object v2, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v2}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, iter:Ljava/util/Enumeration;
    :cond_0
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v2

    if-nez v2, :cond_1

    .line 487
    const/4 v2, 0x0

    :goto_0
    return-object v2

    .line 480
    :cond_1
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/platform/common/Ticket;

    .line 482
    .local v1, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v2, v1, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    cmp-long v2, v2, p1

    if-nez v2, :cond_0

    move-object v2, v1

    .line 484
    goto :goto_0
.end method

.method public GenerateTicket(Lcom/glympse/platform/common/Ticket;Ljava/lang/String;)Z
    .locals 5
    .parameter "oTicket"
    .parameter "strSource"

    .prologue
    const/4 v4, 0x1

    .line 360
    iget v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_nNextSequence:I

    add-int/lit8 v1, v0, 0x1

    iput v1, p0, Lcom/glympse/platform/common/SentTicketList;->m_nNextSequence:I

    iput v0, p1, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    .line 363
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v0

    iput-wide v0, p1, Lcom/glympse/platform/common/Ticket;->m_lStartTime:J

    .line 368
    iget-wide v0, p1, Lcom/glympse/platform/common/Ticket;->m_lStartTime:J

    iget v2, p1, Lcom/glympse/platform/common/Ticket;->m_nDurationMs:I

    int-to-long v2, v2

    add-long/2addr v0, v2

    iput-wide v0, p1, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    .line 371
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0, p1}, Lcom/glympse/platform/GVector$Tickets;->addElement(Ljava/lang/Object;)V

    .line 372
    iput-boolean v4, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 375
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    const/16 v1, 0x1000

    invoke-virtual {v0, v1}, Lcom/glympse/platform/Platform;->DoUpdate(I)V

    .line 378
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v0, p1, p2}, Lcom/glympse/platform/common/ServerPost;->AddGenerateTicket(Lcom/glympse/platform/common/Ticket;Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 380
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget-object v0, v0, Lcom/glympse/platform/Platform;->m_oServerPost:Lcom/glympse/platform/common/ServerPost;

    invoke-virtual {v0}, Lcom/glympse/platform/common/ServerPost;->PostNow()V

    move v0, v4

    .line 384
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public GetExpireTime()J
    .locals 2

    .prologue
    .line 512
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->Sort()V

    .line 516
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0}, Lcom/glympse/platform/GVector$Tickets;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    const-wide/16 v0, 0x0

    .end local p0
    :goto_0
    return-wide v0

    .restart local p0
    :cond_0
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/glympse/platform/GVector$Tickets;->elementAt(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/glympse/platform/common/Ticket;

    iget-wide v0, p0, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    goto :goto_0
.end method

.method public ProcessDone(Z)V
    .locals 4
    .parameter "fPhoneSession"

    .prologue
    .line 335
    if-eqz p1, :cond_0

    .line 337
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->GetExpireTime()J

    move-result-wide v0

    .line 338
    .local v0, lExpireTime:J
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iget-wide v2, v2, Lcom/glympse/platform/Config;->m_lExpireTime:J

    cmp-long v2, v2, v0

    if-eqz v2, :cond_0

    .line 340
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    iput-wide v0, v2, Lcom/glympse/platform/Config;->m_lExpireTime:J

    .line 341
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oConfig:Lcom/glympse/platform/Config;

    invoke-virtual {v2}, Lcom/glympse/platform/Config;->Save()V

    .line 344
    .end local v0           #lExpireTime:J
    :cond_0
    return-void
.end method

.method public ProcessExpireOnArrival(Lcom/glympse/platform/common/LocPoint;)Z
    .locals 14
    .parameter "oLocPoint"

    .prologue
    const-wide/16 v12, 0x4e20

    .line 523
    invoke-virtual {p1}, Lcom/glympse/platform/common/LocPoint;->HasLocation()Z

    move-result v6

    if-nez v6, :cond_0

    .line 525
    const/4 v6, 0x0

    .line 603
    :goto_0
    return v6

    .line 529
    :cond_0
    invoke-virtual {p0}, Lcom/glympse/platform/common/SentTicketList;->Sort()V

    .line 531
    const/4 v4, 0x0

    .local v4, oCoordsLoc:Lcom/glympse/platform/GCoordinates;
    const/4 v3, 0x0

    .line 533
    .local v3, oCoordsDest:Lcom/glympse/platform/GCoordinates;
    invoke-static {}, Lcom/glympse/platform/common/CorrectedTime;->GetTime()J

    move-result-wide v1

    .line 536
    .local v1, lCurrent:J
    iget-object v6, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, iter:Ljava/util/Enumeration;
    :cond_1
    :goto_1
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v6

    if-nez v6, :cond_3

    .line 603
    :cond_2
    invoke-virtual {p0, v1, v2}, Lcom/glympse/platform/common/SentTicketList;->CheckForArrival(J)Z

    move-result v6

    goto :goto_0

    .line 538
    :cond_3
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/glympse/platform/common/Ticket;

    .line 541
    .local v5, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v6, v5, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v6, v6, v1

    if-lez v6, :cond_2

    .line 547
    iget-boolean v6, v5, Lcom/glympse/platform/common/Ticket;->m_fArrived:Z

    if-nez v6, :cond_1

    .line 553
    invoke-virtual {v5}, Lcom/glympse/platform/common/Ticket;->HasLocation()Z

    move-result v6

    if-eqz v6, :cond_1

    .line 556
    if-nez v4, :cond_4

    .line 558
    new-instance v4, Lcom/glympse/platform/GCoordinates;

    .end local v4           #oCoordsLoc:Lcom/glympse/platform/GCoordinates;
    invoke-direct {v4, p1}, Lcom/glympse/platform/GCoordinates;-><init>(Lcom/glympse/platform/common/LocPoint;)V

    .line 560
    .restart local v4       #oCoordsLoc:Lcom/glympse/platform/GCoordinates;
    :cond_4
    new-instance v3, Lcom/glympse/platform/GCoordinates;

    .line 561
    .end local v3           #oCoordsDest:Lcom/glympse/platform/GCoordinates;
    iget-object v6, v5, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v6, v6, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    .line 562
    iget-object v8, v5, Lcom/glympse/platform/common/Ticket;->m_oDestination:Lcom/glympse/platform/common/Place;

    iget-wide v8, v8, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    .line 560
    invoke-direct {v3, v6, v7, v8, v9}, Lcom/glympse/platform/GCoordinates;-><init>(DD)V

    .line 565
    .restart local v3       #oCoordsDest:Lcom/glympse/platform/GCoordinates;
    invoke-virtual {v4, v3}, Lcom/glympse/platform/GCoordinates;->DistanceTo(Lcom/glympse/platform/GCoordinates;)F

    move-result v6

    iput v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    .line 574
    invoke-virtual {p1}, Lcom/glympse/platform/common/LocPoint;->HasAccuracy()Z

    move-result v6

    if-eqz v6, :cond_5

    .line 576
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    iget v7, p1, Lcom/glympse/platform/common/LocPoint;->m_fltAccuracyMeters:F

    add-float/2addr v6, v7

    iput v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    .line 580
    :cond_5
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    iget v7, v5, Lcom/glympse/platform/common/Ticket;->m_fltMinDistMeters:F

    cmpg-float v6, v6, v7

    if-gez v6, :cond_1

    .line 583
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltCurDistMeters:F

    iput v6, v5, Lcom/glympse/platform/common/Ticket;->m_fltMinDistMeters:F

    .line 589
    iget-wide v6, v5, Lcom/glympse/platform/common/Ticket;->m_lAutoExpireTime:J

    sub-long/2addr v6, v1

    cmp-long v6, v6, v12

    if-gtz v6, :cond_6

    iget-boolean v6, v5, Lcom/glympse/platform/common/Ticket;->m_fProximitySatisfied:Z

    if-nez v6, :cond_1

    .line 595
    :cond_6
    const-wide/16 v6, 0x3e8

    iget v8, v5, Lcom/glympse/platform/common/Ticket;->m_fltMinDistMeters:F

    float-to-double v8, v8

    const-wide/high16 v10, 0x3ff4

    div-double/2addr v8, v10

    double-to-long v8, v8

    mul-long/2addr v6, v8

    add-long/2addr v6, v1

    add-long/2addr v6, v12

    iput-wide v6, v5, Lcom/glympse/platform/common/Ticket;->m_lAutoExpireTime:J

    goto :goto_1
.end method

.method public ProcessSentenceTD(Lcom/glympse/platform/GVector$NameValueNodes;)Z
    .locals 8
    .parameter

    .prologue
    .local p1, listNameValues:Lcom/glympse/platform/GVector$NameValueNodes;,"Lcom/glympse/platform/GVector$NameValueNodes;"
    const/4 v7, 0x0

    .line 272
    const-wide/16 v1, 0x0

    .line 275
    .local v1, lTicketId:J
    invoke-virtual {p1}, Lcom/glympse/platform/GVector$NameValueNodes;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, iter:Ljava/util/Enumeration;
    :cond_0
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v5

    if-nez v5, :cond_1

    .line 289
    :goto_0
    const-wide/16 v5, 0x0

    cmp-long v5, v5, v1

    if-nez v5, :cond_2

    .line 291
    const-string v5, "Failed to find ticket ID in TD line."

    invoke-static {v5}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    move v5, v7

    .line 314
    :goto_1
    return v5

    .line 277
    :cond_1
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/glympse/platform/common/NameValueNode;

    .line 280
    .local v3, oNodeCur:Lcom/glympse/platform/common/NameValueNode;
    iget-object v5, v3, Lcom/glympse/platform/common/NameValueNode;->m_strName:Ljava/lang/String;

    if-eqz v5, :cond_0

    iget-object v5, v3, Lcom/glympse/platform/common/NameValueNode;->m_strName:Ljava/lang/String;

    const-string v6, "tid"

    invoke-virtual {v5, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 283
    iget-object v5, v3, Lcom/glympse/platform/common/NameValueNode;->m_strValue:Ljava/lang/String;

    invoke-static {v5}, Lcom/glympse/platform/common/Helpers;->Base32ToLong(Ljava/lang/String;)J

    move-result-wide v1

    .line 284
    goto :goto_0

    .line 296
    .end local v3           #oNodeCur:Lcom/glympse/platform/common/NameValueNode;
    :cond_2
    iget-object v5, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v5}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v0

    :cond_3
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v5

    if-nez v5, :cond_4

    move v5, v7

    .line 314
    goto :goto_1

    .line 298
    :cond_4
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/glympse/platform/common/Ticket;

    .line 300
    .local v4, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v5, v4, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    cmp-long v5, v5, v1

    if-nez v5, :cond_3

    .line 303
    iget-object v5, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v5, v4}, Lcom/glympse/platform/GVector$Tickets;->removeElement(Ljava/lang/Object;)Z

    .line 306
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v5

    iget v6, v5, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    or-int/lit16 v6, v6, 0x1000

    iput v6, v5, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    .line 308
    const/4 v5, 0x1

    goto :goto_1
.end method

.method public ProcessSentenceTG(Lcom/glympse/platform/GVector$NameValueNodes;)Z
    .locals 11
    .parameter

    .prologue
    .local p1, listNameValues:Lcom/glympse/platform/GVector$NameValueNodes;,"Lcom/glympse/platform/GVector$NameValueNodes;"
    const/4 v10, 0x1

    .line 64
    new-instance v5, Lcom/glympse/platform/common/Ticket;

    invoke-direct {v5}, Lcom/glympse/platform/common/Ticket;-><init>()V

    .line 67
    .local v5, oTicketNew:Lcom/glympse/platform/common/Ticket;
    invoke-virtual {v5, p1}, Lcom/glympse/platform/common/Ticket;->Parse(Lcom/glympse/platform/GVector$NameValueNodes;)V

    .line 70
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    iget v7, p0, Lcom/glympse/platform/common/SentTicketList;->m_nNextSequence:I

    if-lt v6, v7, :cond_0

    .line 72
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    add-int/lit8 v6, v6, 0x1

    iput v6, p0, Lcom/glympse/platform/common/SentTicketList;->m_nNextSequence:I

    .line 76
    :cond_0
    const-wide/16 v6, 0x0

    iget-wide v8, v5, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    cmp-long v6, v6, v8

    if-nez v6, :cond_1

    .line 78
    const-string v6, "Failed to find ticket ID in TG line."

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 79
    const/4 v6, 0x0

    .line 129
    :goto_0
    return v6

    .line 83
    :cond_1
    const/4 v4, 0x0

    .line 84
    .local v4, oTicketFound:Lcom/glympse/platform/common/Ticket;
    iget-object v6, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, iter:Ljava/util/Enumeration;
    :cond_2
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v6

    if-nez v6, :cond_4

    .line 103
    :goto_1
    if-eqz v4, :cond_6

    .line 106
    iget-wide v1, v4, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    .line 109
    .local v1, lExpireTime:J
    invoke-virtual {v4, p1}, Lcom/glympse/platform/common/Ticket;->Parse(Lcom/glympse/platform/GVector$NameValueNodes;)V

    .line 112
    iget-wide v6, v4, Lcom/glympse/platform/common/Ticket;->m_lExpireTime:J

    cmp-long v6, v1, v6

    if-eqz v6, :cond_3

    .line 114
    iput-boolean v10, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 127
    .end local v1           #lExpireTime:J
    :cond_3
    :goto_2
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    iget v7, v6, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    or-int/lit16 v7, v7, 0x1000

    iput v7, v6, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    move v6, v10

    .line 129
    goto :goto_0

    .line 86
    :cond_4
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/glympse/platform/common/Ticket;

    .line 89
    .local v3, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v6, v3, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    iget-wide v8, v5, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    cmp-long v6, v6, v8

    if-eqz v6, :cond_5

    .line 90
    iget v6, v5, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    if-eqz v6, :cond_2

    iget v6, v3, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    iget v7, v5, Lcom/glympse/platform/common/Ticket;->m_nSequence:I

    if-ne v6, v7, :cond_2

    .line 93
    :cond_5
    iget-wide v6, v5, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    iput-wide v6, v3, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    .line 96
    move-object v4, v3

    .line 97
    goto :goto_1

    .line 122
    .end local v3           #oTicketCur:Lcom/glympse/platform/common/Ticket;
    :cond_6
    iget-object v6, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v6, v5}, Lcom/glympse/platform/GVector$Tickets;->addElement(Ljava/lang/Object;)V

    .line 123
    iput-boolean v10, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    goto :goto_2
.end method

.method public ProcessSentenceTS(Lcom/glympse/platform/GVector$NameValueNodes;)Z
    .locals 10
    .parameter

    .prologue
    .line 140
    .local p1, listNameValues:Lcom/glympse/platform/GVector$NameValueNodes;,"Lcom/glympse/platform/GVector$NameValueNodes;"
    new-instance v3, Lcom/glympse/platform/common/Recipient;

    invoke-direct {v3}, Lcom/glympse/platform/common/Recipient;-><init>()V

    .line 143
    .local v3, oRecipientNew:Lcom/glympse/platform/common/Recipient;
    invoke-virtual {v3, p1}, Lcom/glympse/platform/common/Recipient;->Parse(Lcom/glympse/platform/GVector$NameValueNodes;)V

    .line 146
    const-wide/16 v6, 0x0

    iget-wide v8, v3, Lcom/glympse/platform/common/Recipient;->m_lTicketId:J

    cmp-long v6, v6, v8

    if-nez v6, :cond_0

    .line 148
    const-string v6, "Failed to find ticket ID in TS line."

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 149
    const/4 v6, 0x0

    .line 265
    :goto_0
    return v6

    .line 153
    :cond_0
    const/4 v4, 0x0

    .line 154
    .local v4, oTicket:Lcom/glympse/platform/common/Ticket;
    iget-object v6, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Tickets;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .local v0, iter:Ljava/util/Enumeration;
    :cond_1
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v6

    if-nez v6, :cond_2

    .line 166
    :goto_1
    if-nez v4, :cond_3

    .line 168
    const-string v6, "Failed to find ticket specified in TS line."

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/String;)V

    .line 169
    const/4 v6, 0x0

    goto :goto_0

    .line 156
    :cond_2
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/glympse/platform/common/Ticket;

    .line 158
    .local v5, oTicketCur:Lcom/glympse/platform/common/Ticket;
    iget-wide v6, v5, Lcom/glympse/platform/common/Ticket;->m_lTicketId:J

    iget-wide v8, v3, Lcom/glympse/platform/common/Recipient;->m_lTicketId:J

    cmp-long v6, v6, v8

    if-nez v6, :cond_1

    .line 160
    move-object v4, v5

    .line 161
    goto :goto_1

    .line 187
    .end local v5           #oTicketCur:Lcom/glympse/platform/common/Ticket;
    :cond_3
    const/4 v2, 0x0

    .line 188
    .local v2, oRecipientFound:Lcom/glympse/platform/common/Recipient;
    iget-object v6, v4, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Recipients;->elements()Ljava/util/Enumeration;

    move-result-object v0

    :cond_4
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v6

    if-nez v6, :cond_a

    .line 204
    :goto_2
    if-nez v2, :cond_6

    .line 206
    iget-object v6, v4, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    invoke-virtual {v6}, Lcom/glympse/platform/GVector$Recipients;->elements()Ljava/util/Enumeration;

    move-result-object v0

    :cond_5
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v6

    if-nez v6, :cond_c

    .line 223
    :cond_6
    :goto_3
    if-eqz v2, :cond_e

    .line 225
    invoke-virtual {v2, p1}, Lcom/glympse/platform/common/Recipient;->Parse(Lcom/glympse/platform/GVector$NameValueNodes;)V

    .line 236
    :goto_4
    const/4 v6, -0x1

    iget v7, v2, Lcom/glympse/platform/common/Recipient;->m_nResult:I

    if-eq v6, v7, :cond_7

    iget v6, v2, Lcom/glympse/platform/common/Recipient;->m_nResult:I

    if-nez v6, :cond_8

    .line 237
    :cond_7
    const/4 v6, -0x1

    iget v7, v2, Lcom/glympse/platform/common/Recipient;->m_nResult:I

    if-ne v6, v7, :cond_f

    iget-object v6, v2, Lcom/glympse/platform/common/Recipient;->m_strResult:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_f

    .line 239
    :cond_8
    const/4 v6, 0x4

    iput v6, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    .line 263
    :cond_9
    :goto_5
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    iget v7, v6, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    or-int/lit16 v7, v7, 0x1000

    iput v7, v6, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    .line 265
    const/4 v6, 0x1

    goto :goto_0

    .line 190
    :cond_a
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/platform/common/Recipient;

    .line 192
    .local v1, oRecipientCur:Lcom/glympse/platform/common/Recipient;
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_b

    .line 193
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iget-object v7, v3, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 194
    :cond_b
    iget v6, v1, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    iget v7, v3, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    if-ne v6, v7, :cond_4

    .line 195
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iget-object v7, v3, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 196
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strDisplayName:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iget-object v7, v3, Lcom/glympse/platform/common/Recipient;->m_strDisplayName:Ljava/lang/String;

    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 198
    move-object v2, v1

    .line 199
    goto/16 :goto_2

    .line 208
    .end local v1           #oRecipientCur:Lcom/glympse/platform/common/Recipient;
    :cond_c
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/glympse/platform/common/Recipient;

    .line 210
    .restart local v1       #oRecipientCur:Lcom/glympse/platform/common/Recipient;
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v6

    if-nez v6, :cond_d

    .line 211
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iget-object v7, v3, Lcom/glympse/platform/common/Recipient;->m_strRecipientUrl:Ljava/lang/String;

    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_5

    .line 212
    :cond_d
    iget v6, v1, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    iget v7, v3, Lcom/glympse/platform/common/Recipient;->m_eRecipientType:I

    if-ne v6, v7, :cond_5

    .line 213
    iget-object v6, v1, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    invoke-static {v6}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iget-object v7, v3, Lcom/glympse/platform/common/Recipient;->m_strTo:Ljava/lang/String;

    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_5

    .line 215
    move-object v2, v1

    .line 216
    goto/16 :goto_3

    .line 231
    .end local v1           #oRecipientCur:Lcom/glympse/platform/common/Recipient;
    :cond_e
    iget-object v6, v4, Lcom/glympse/platform/common/Ticket;->m_listRecipients:Lcom/glympse/platform/GVector$Recipients;

    invoke-virtual {v6, v3}, Lcom/glympse/platform/GVector$Recipients;->addElement(Ljava/lang/Object;)V

    .line 232
    move-object v2, v3

    goto/16 :goto_4

    .line 243
    :cond_f
    const/4 v6, 0x1

    iget v7, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-ne v6, v7, :cond_10

    .line 246
    const/4 v6, 0x2

    iput v6, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    .line 248
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v6

    invoke-virtual {v6, v4, v2}, Lcom/glympse/platform/Platform;->SendInviteToRecipient(Lcom/glympse/platform/common/Ticket;Lcom/glympse/platform/common/Recipient;)Z

    move-result v6

    if-nez v6, :cond_9

    .line 250
    const/4 v6, 0x4

    iput v6, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    goto/16 :goto_5

    .line 255
    :cond_10
    const/4 v6, 0x2

    iget v7, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-eq v6, v7, :cond_9

    .line 256
    const/4 v6, 0x4

    iget v7, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    if-eq v6, v7, :cond_9

    .line 259
    const/4 v6, 0x5

    iput v6, v2, Lcom/glympse/platform/common/Recipient;->m_eSendState:I

    goto/16 :goto_5
.end method

.method public Sort()V
    .locals 2

    .prologue
    .line 52
    iget-boolean v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    if-eqz v0, :cond_0

    .line 54
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    iget-object v1, p0, Lcom/glympse/platform/common/SentTicketList;->m_oTicketComparator:Lcom/glympse/platform/common/Ticket$CompareByExpireTime;

    invoke-virtual {v0, v1}, Lcom/glympse/platform/GVector$Tickets;->Sort(Lcom/glympse/platform/GComparator;)V

    .line 55
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 57
    :cond_0
    return-void
.end method

.method public Start()V
    .locals 0

    .prologue
    .line 33
    return-void
.end method

.method public Stop()V
    .locals 2

    .prologue
    .line 39
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0}, Lcom/glympse/platform/GVector$Tickets;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    .line 41
    iget-object v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_listTickets:Lcom/glympse/platform/GVector$Tickets;

    invoke-virtual {v0}, Lcom/glympse/platform/GVector$Tickets;->removeAllElements()V

    .line 42
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/glympse/platform/common/SentTicketList;->m_fNeedsSorting:Z

    .line 45
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v0

    iget v1, v0, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    or-int/lit16 v1, v1, 0x1000

    iput v1, v0, Lcom/glympse/platform/Platform;->m_nUpdateFlags:I

    .line 47
    :cond_0
    return-void
.end method
